import request from '@/common/request.js'

const api = {}
// POST、GET //必须大写，为了兼容其他应用

// 登陆（不需要token验证）
api.login = params => request.allRequest(`/user/login`, 'POST', params);
api.reg = params => request.allRequest(`/user/reg`, 'POST', params);
api.headList = params => request.allRequest(`/index/head`, 'GET', params);
api.usersList = params => request.allRequest(`/user/users`, 'POST', params);
api.uplayjl = params => request.allRequest(`/user/uplayjl`, 'POST', params);
api.indexIn = params => request.allRequest(`/index/index`, 'GET', params);
api.filterIn = params => request.allRequest(`/index/filter`, 'GET', params);
api.tab3 = params => request.allRequest(`/index/tab3`, 'GET', params);
api.filtertype = params => request.allRequest(`/index/filtertype`, 'GET', params);
api.lm = params => request.allRequest(`/index/lm`, 'GET', params);
api.txttype = params => request.allRequest(`/index/txttype`, 'GET', params); // 可可福利
api.tab1 = params => request.allRequest(`/index/tab1`, 'GET', params);
api.tab2 = params => request.allRequest(`/index/tab2`, 'GET', params);
api.ttx = params => request.allRequest(`/index/ttx`, 'GET', params);
api.zxlist = params => request.allRequest(`/index/zxlist`, 'GET', params);
api.starlist = params => request.allRequest(`/index/starlist`, 'GET', params);
api.search = params => request.allRequest(`/index/search`, 'GET', params);
api.collect = params => request.allRequest(`/index/collect`, 'POST', params);
api.sclistdel = params => request.allRequest(`/index/sclistdel`, 'POST', params);
api.editpass = params => request.allRequest(`/index/editpass`, 'POST', params);
api.mydaili = params => request.allRequest(`/user/mydaili`, 'POST', params);
api.upayjl = params => request.allRequest(`/user/upayjl`, 'POST', params);
api.usharejl = params => request.allRequest(`/user/usharejl`, 'POST', params);
api.txttype = params => request.allRequest(`/index/txttype`, 'GET', params);
api.vodzt = params => request.allRequest(`/index/vodzt`, 'GET', params);
api.sczt = params => request.allRequest(`/index/sczt`, 'POST', params);
api.sharepic = params => request.allRequest(`/user/sharepic`, 'GET', params);
api.randlist = params => request.allRequest(`/play/randlist`, 'GET', params);
api.sclist = params => request.allRequest(`/index/sclist`, 'POST ', params); 
api.cardjh = params => request.allRequest(`/user/cardjh`, 'POST', params); 
api.txtlist = params => request.allRequest(`/index/txtlist`, 'GET', params); 
api.ufankuijl = params => request.allRequest(`/user/ufankuijl`, 'POST', params); 
api.fankui = params => request.allRequest(`/user/fankui`, 'POST', params);
api.txt = params => request.allRequest(`/play/txt`, 'GET', params);
api.playjl = params => request.allRequest(`/user/playjl`, 'POST', params);


api.vod = params => request.allRequest(`/play/vod`, 'POST', params);


// GET请求
api.requestGET = id => request.allRequest(`/app/~/` + id, 'GET', '');

export default api
